-
Notifications
You must be signed in to change notification settings - Fork 11
feat(FIR-49930): add bulk_insert parameter to executemany for improved INSERT performance #463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
devin-ai-integration
wants to merge
15
commits into
refactor-query-preparation
Choose a base branch
from
devin/1760003599-bulk-insert-executemany
base: refactor-query-preparation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(FIR-49930): add bulk_insert parameter to executemany for improved INSERT performance #463
devin-ai-integration
wants to merge
15
commits into
refactor-query-preparation
from
devin/1760003599-bulk-insert-executemany
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ptiurin
reviewed
Oct 10, 2025
devin-ai-integration bot
added a commit
that referenced
this pull request
Oct 10, 2025
…n logic - Replace sqlparse with simple string checks in _validate_bulk_insert_query - Add extra_params parameter to _build_fb_numeric_query_params for extensibility - Refactor _executemany_bulk_insert to preprocess and delegate to existing methods - Use TimeoutController for consistent timeout handling - Parametrize integration tests to avoid duplication Addresses PR feedback from ptiurin on #463 Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
devin-ai-integration bot
added a commit
that referenced
this pull request
Oct 10, 2025
- Move firebolt.db and firebolt.async_db imports to top of test files - Remove local import statements from inside test functions - Use full module names instead of local aliases Addresses final PR feedback from ptiurin on #463 Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
ptiurin
reviewed
Oct 13, 2025
devin-ai-integration bot
added a commit
that referenced
this pull request
Oct 13, 2025
- Remove QMARK parameter style example from bulk_insert documentation - Update note to explicitly state bulk_insert requires fb_numeric - Clarify that using other parameter styles will raise an error Addresses PR feedback from ptiurin on #463 Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
…rformance - Add bulk_insert flag to executemany() in both sync and async cursors - Concatenate multiple INSERT queries with semicolons when bulk_insert=True - Send with merge_prepared_statement_batches=true query parameter - Support both QMARK and FB_NUMERIC parameter styles - Add validation to ensure only INSERT statements use bulk_insert - Add comprehensive unit tests for both sync and async cursors - Add integration tests for V2 (sync and async) - Add documentation with examples for both parameter styles Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
…meters Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
…n logic - Replace sqlparse with simple string checks in _validate_bulk_insert_query - Add extra_params parameter to _build_fb_numeric_query_params for extensibility - Refactor _executemany_bulk_insert to preprocess and delegate to existing methods - Use TimeoutController for consistent timeout handling - Parametrize integration tests to avoid duplication Addresses PR feedback from ptiurin on #463 Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
- Move firebolt.db and firebolt.async_db imports to top of test files - Remove local import statements from inside test functions - Use full module names instead of local aliases Addresses final PR feedback from ptiurin on #463 Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
- Remove QMARK parameter style example from bulk_insert documentation - Update note to explicitly state bulk_insert requires fb_numeric - Clarify that using other parameter styles will raise an error Addresses PR feedback from ptiurin on #463 Co-Authored-By: petro.tiurin@firebolt.io <petro.tiurin@firebolt.io>
49854e4
to
97b5c56
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add bulk_insert parameter to executemany() for improved INSERT performance
Summary
Adds a new
bulk_insert
parameter to theexecutemany()
method in both sync and async cursors. When enabled, this feature concatenates multiple INSERT statements into a single batch request withmerge_prepared_statement_batches=true
, providing significant performance improvements for large data insertions.Key Changes:
bulk_insert
parameter (defaults toFalse
for backward compatibility)?
) and FB_NUMERIC ($1
,$2
) parameter stylesReview & Testing Checklist for Human
Critical items requiring manual verification:
Session Info: Implemented by Devin AI for @ptiurin
Session URL: https://app.devin.ai/sessions/45091a6335424e0798501799fd55a858